Skip to content

Support multi-pin assigns in footprint pinning#509

Merged
ducky64 merged 8 commits into
masterfrom
multi-footprint-pins
Jun 1, 2026
Merged

Support multi-pin assigns in footprint pinning#509
ducky64 merged 8 commits into
masterfrom
multi-footprint-pins

Conversation

@ducky64
Copy link
Copy Markdown
Collaborator

@ducky64 ducky64 commented Jun 1, 2026

... and refactors some examples to use this.

Also restructures STM microcontrollers to use the new system pindef style from #508 . Updates the STM32F103 JLC metadata to reflect the part choice change from a prior PR.

Resolves #504

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds tuple-style multi-pin footprint assignments and refactors part pinning maps, especially STM microcontrollers, to use the new system pin definition style.

Changes:

  • Extends FootprintBlock.footprint and IO controller pinning types to accept multi-pin keys.
  • Refactors many component footprint maps to group equivalent pins.
  • Simplifies STM microcontroller variant classes by inlining single-package device definitions.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
edg/electronics_model/CircuitBlock.py Adds multi-pin footprint key expansion.
edg/abstract_parts/IoController.py Updates system pinmap / pinning return types.
edg/abstract_parts/BaseIoControllerWrapped.py Allows wrapped controller fixed pinning to use multi-pin keys without mutating inputs.
edg/electronics_model/KiCadSchematicBlock.py Inlines generated pin mapping into footprint call.
edg/parts/microcontroller/Stm32f103.py Refactors STM32F103 48-pin model to direct pin mappings.
edg/parts/microcontroller/Stm32f303.py Refactors Nucleo F303K8 interfaces and pin mapping.
edg/parts/microcontroller/Stm32g031.py Refactors STM32G031 package pin mapping.
edg/parts/microcontroller/Stm32g431.py Refactors STM32G431 package pin mapping.
edg/parts/microcontroller/Stm32l432.py Refactors STM32L432 package pin mapping.
edg/parts/microcontroller/Rp2040.py Groups repeated RP2040 power pins.
edg/parts/microcontroller/nRF52840.py Groups repeated nRF52840 ground pins.
edg/parts/microcontroller/Lpc1549.py Updates pinmap typing and documents legacy variant style.
edg/parts/microcontroller/Ice40up.py Groups repeated FPGA supply pins.
edg/parts/microcontroller/Esp32.py Groups repeated ESP32 ground pins.
edg/parts/microcontroller/Esp32c3.py Groups repeated ESP32-C3 supply pins and removes redundant annotations.
edg/parts/microcontroller/Esp32s3.py Groups repeated ESP32-S3 ground pins and removes camera SCCB exposure.
edg/parts/connector/UsbPorts.py Groups equivalent USB-C connector pins.
edg/parts/display/oled/Nhd_312_25664uc.py Groups OLED interface pins tied to VSS.
edg/parts/human_interface/Joystick_Xbox.py Groups joystick power and ground pins.
edg/parts/interface/UsbInterface_Ft232h.py Groups FT232H supply and ground pins.
edg/parts/interface/UsbPd_Fusb302b.py Groups FUSB302B supply and ground pins.
edg/parts/power/converter/LinearRegulators.py Updates pinning type annotation.
edg/parts/power/motor/Bldc_Drv8313.py Groups repeated motor driver supply and ground pins.
edg/parts/power/motor/MotorDriver_L293dd.py Groups motor driver ground pins.
edg/parts/power/motor/StepperDriver_A4988.py Groups A4988 ground pins.
edg/parts/sensor/FlirLepton.py Groups repeated Lepton connector ground pins.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# C77994 for GD32F103C8T6, probably mostly drop-in compatible, NOT basic part
LCSC_BASIC_PART = True
self.assign(self.lcsc_part, "C8304") # max memory CBT6 variant
self.assign(self.actual_basic_part, False)
Comment on lines +118 to +119
for pin in pin_tuples:
pinning_array.append(f"{pin}={pin_port._name_from(self)}")
Comment thread edg/parts/microcontroller/Lpc1549.py Outdated
from ...circuits import *
from ...vendor_parts.jlc.JlcPart import JlcPart

# This file use an old style that uses inheritance to allow variations of the same chip.
@ducky64 ducky64 merged commit 1392be7 into master Jun 1, 2026
12 checks passed
@ducky64 ducky64 deleted the multi-footprint-pins branch June 1, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footprint should optionally take Tuple[str] as keys, like PassiveConnector.connected

2 participants